package com.atguigu.gulimall.cart.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 商品服务
 *
 * @author DuGuanghan
 * @since 2025-02-14 16:53:39
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {
    /**
     * 获取sku信息
     *
     * @param skuId SKU 编号
     * @return {@link R }
     * @author DuGuanghan
     * @since 2025-02-14 16:53:59
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    R info(@PathVariable("skuId") Long skuId);

    /**
     * 获取sku销售属性组合
     *
     * @param skuId SKU 编号
     * @return {@link R }
     * @author DuGuanghan
     * @since 2025-02-17 11:24:11
     */
    @RequestMapping("/product/skusaleattrvalue/getSkuSaleAttrValueBySkuId")
    R getSkuSaleAttrValueBySkuId(@RequestParam("skuId") Long skuId);
}
